﻿using System;
using ProtoBuf;
using ZyGames.Framework.Common;
using ZyGames.Framework.Collection;
using ZyGames.Framework.Model;


namespace ZyGames.DZPocker.Model
{
	/// <summary>
	/// 
	/// </summary>
	[Serializable, ProtoContract]
	[EntityTable(AccessLevel.WriteOnly, DbConfig.Log)]
	public class ChatLog : LogEntity
	{
		/// <summary>
		/// </summary>
		public ChatLog()
		{

		}
		/// <summary>
		/// </summary>
		public ChatLog(int chatID)
			: this()
		{
			ChatID = chatID;
		}

		/// <summary>
		/// 
		/// </summary>        
		[ProtoMember(1)]
		[EntityField(true, IsIdentity = true)]
		public int ChatID { get; set; }

		/// <summary>
		/// 
		/// </summary>        
		[ProtoMember(2)]
		[EntityField]
		public ChatType ChatType { get; set; }
		/// <summary>
		/// 
		/// </summary>        
		[ProtoMember(3)]
		[EntityField]
		public int FromUserID { get; set; }
		/// <summary>
		/// 
		/// </summary>        
		[ProtoMember(4)]
		[EntityField]
		public string FromUserName { get; set; }
		/// <summary>
		/// 
		/// </summary>        
		[ProtoMember(5)]
		[EntityField]
		public int ToUserID { get; set; }
		/// <summary>
		/// 
		/// </summary>        
		[ProtoMember(6)]
		[EntityField]
		public string ToUserName { get; set; }
		/// <summary>
		/// 
		/// </summary>        
		[ProtoMember(7)]
		[EntityField]
		public string Content { get; set; }
		/// <summary>
		/// 
		/// </summary>        
		[ProtoMember(8)]
		[EntityField]
		public DateTime SendDate { get; set; }
	}
}